<?php

namespace app\api\model;

/**
 * @method static getByGoodsId($goods_id)
 */
class GoodsProduct extends BaseModel
{
    protected $table = 'fa_store_goods_product';
    protected $type = [
        'specifications' => 'array'
    ];

    /**
     * @param array $productIds
     * @return bool|\PDOStatement|string|\think\Collection
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     */
    public static function getByGoodsIdS(array $productIds)
    {
        return self::where('id', 'in', $productIds)->select();
    }
}